package cn.wolfcode.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@ToString
@TableName("comment")
public class Comment {
    @TableId(type= IdType.AUTO)
    private Long id;
    private String detail;
    private Date creatime;
    @TableField(value = "author_id")
    private Long authorId;
    @TableField(value = "author_name")
    private String  authorName;
    @TableField(exist = false)
    private Employee author;
    @TableField(value = "messageBoard_id")
    private Long messageBoardId;
    @TableField(exist = false)
    private List<Comment> children = new ArrayList<>();
    @TableField(value = "parent_id")
    private Long parentId;

}
